# $Id$

class ProjectReportForm < ActiveRecord::Base
  unloadable
  
  belongs_to :project
  has_many :issue_groups, :class_name => "ProjectReportIssueGroup"
  has_many :teams, :class_name => "ProjectReportTeam"

  def reports
    return @reports if @reports
    @reports = ProjectReport.find(:all, :conditions => ["#{ProjectReport.table_name}.project_report_form_id = ?", self.id], :order => "#{ProjectReport.table_name}.start_date desc")
  end

end
